package com.nowcoder.community.entity;

import java.util.HashMap;
import java.util.Map;

public class Event {

    private String topic;

    private int userId;

    private int entityType;

    private int entityId;

    private int entityUserId;

    private Map<String, Object> data = new HashMap<>();


    public String getTopic() {
        return this.topic;
    }

    public Event setTopic(final String topic) {
        this.topic = topic;
        return this;
    }

    public int getUserId() {
        return this.userId;
    }

    public Event setUserId(final int userId) {
        this.userId = userId;
        return this;
    }

    public int getEntityType() {
        return this.entityType;
    }

    public Event setEntityType(final int entityType) {
        this.entityType = entityType;
        return this;
    }

    public int getEntityId() {
        return this.entityId;
    }

    public Event setEntityId(final int entityId) {
        this.entityId = entityId;
        return this;
    }

    public int getEntityUserId() {
        return this.entityUserId;
    }

    public Event setEntityUserId(final int entityUserId) {
        this.entityUserId = entityUserId;
        return this;
    }

    public Map<String, Object> getData() {
        return this.data;
    }

    public Event setData(String key, Object value) {
        this.data.put(key, value);
        return this;
    }



    @Override
    public String toString() {
        return "Event{" +
                "topic='" + topic + '\'' +
                ", userId=" + userId +
                ", entityType=" + entityType +
                ", entityId=" + entityId +
                ", entityUserId=" + entityUserId +
                ", data=" + data +
                '}';
    }
}
